package com.wyh.spring.demo.service;

import com.wyh.spring.demo.mapper.MessageInfoMapper;
import com.wyh.spring.demo.model.MessageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 王圆豪
 * Date: 2025-07-11
 * Time: 20:48
 */
@Service
public class MessageService {
    @Autowired
    private MessageInfoMapper messageInfoMapper;

    /**
     * 插入数据
     * @param messageInfo
     */
    public void insertMessage(MessageInfo messageInfo) {
        messageInfoMapper.insertMessage(messageInfo);
    }


    public List<MessageInfo> selectAll() {
        return messageInfoMapper.selectAll();
    }
}
